import request from "@/utils/request";

const BASE_URL = "/admin";

const monthlyBillAPI = {
  /** 获取通知轮播分页数据 */
  clearLateFee(data?: any) {
    return request<any>({
      url: `${BASE_URL}/water/waterMeterBill/clearLateFee`,
      method: "POST",
      data,
    });
  },
  /** 获取通知轮播分页数据 */
  getPage(data?: monthlyBillPageQuery) {
    return request<any, PageResult<PageVO[]>>({
      url: `${BASE_URL}/water/waterMeterBill/pageList`,
      method: "POST",
      data,
    });
  },
  /**
   * 作废
   *
   * @param id 账单ID
   */
  waterMeterBill(data: any) {
    return request({
      url: `${BASE_URL}/water/waterMeterBill/wasted`,
      method: "post",
      data,
    });
  },
};

export default monthlyBillAPI;

/** 分页查询参数 */
export interface monthlyBillPageQuery extends PageQuery {
  /** 标题 */
  s_water_meter_code?: string;
  /** code */
  meter_reader_id?: string;
  s_meter_reader_name?: string;
  month?: string;
  // date: any;
  settle_status: number | string;
  valid_status: number | string;
  // 开始结束时间
  created_at_gte?: string | number;
  created_at_lte?: string | number;
}

/** 分页对象 */
export interface PageVO {
  id: string;
  /** name */
  name?: string;
  /** code */
  code?: string;
  /** 备注 */
  remark?: string;
}

/**
 * 表单对象
 */
export interface Form {
  id?: string | number;
  // 名称
  name: string;
  // 手机号
  tel: string;
  // 密码
  login_secret: string;
}
